/**
 * @Author: guo-bomin 2974463764@qq.com
 * @Date: 2024-01-19 15:34:49
 * @LastEditors: guo-bomin 2974463764@qq.com
 * @LastEditTime: 2024-02-27 10:12:18
 * @FilePath: \my-vue-app\src\router\index.js
 * @Description: 郭博民16670506200
 * @有问题微信同号询问，急事call我
 * @Copyright (c) 2024 by 湖南習羽网络科技有限公司, All Rights Reserved.
 */
import {
  createRouter,
  createWebHistory, // 不带
  createWebHashHistory, // 带#
} from 'vue-router';

// 本地静态路由
export const constantRoutes = [
  {
    path: '/test',
    component: () => import('@/views/test/index.vue'),
  },
  {
    path: '/test2',
    component: () => import('@/views/test/index2.vue'),
  },
  {
    path: '/test3',
    component: () => import('@/views/test/index3.vue'),
  },
  {
    path: '/test4',
    component: () => import('@/views/test/index4.vue'),
  },
  //   {
  //     // path: '/404',
  //     path: '/:pathMatch(.*)*', // 防止浏览器刷新时路由未找到警告提示: vue-router.mjs:35 [Vue Router warn]: No match found for location with path "/xxx"
  //     component: () => import('@/views/error-page/404.vue'),
  //   },
];

// 创建路由
const router = createRouter({
  history: createWebHistory(),
  routes: constantRoutes,
});

export default router;
